import axios from '@/libs/api.request'

/**
 * 用户信息列表
 * @param data
 * @returns {wx.RequestTask | never}
 */
export const getList = (params) => {
  return axios.request({
    url: 'GameUser/index',
    method: 'get',
    params: params
  })
}

/**
 * 封禁or解封用户
 * @param data
 * @returns {wx.RequestTask | never}
 */
export const blackUser = (params) => {
  return axios.request({
    url: 'GameUser/blackUser',
    method: 'get',
    params: params
  })
}

/**
 * 封榜or解榜用户
 * @param data
 * @returns {wx.RequestTask | never}
 */
export const rankBlackUser = (params) => {
  return axios.request({
    url: 'GameUser/rankBlackUser',
    method: 'get',
    params: params
  })
}

/**
 * 查询实时在线人数
 * @param data
 * @returns {wx.RequestTask | never}
 */
export const onlineCount = (params) => {
  return axios.request({
    url: 'GameUser/onlineCount',
    method: 'get',
    params: params
  })
}

/**
 * 查询玩家角色列表
 * @param data
 * @returns {wx.RequestTask | never}
 */
export const roleList = (params) => {
  return axios.request({
    url: 'GameUser/roleList',
    method: 'get',
    params: params
  })
}
